public class Test {
    //递归求 N 的阶乘
    public static int fuc(int n){
        if (n==1){
            return 1;
        }
        return n*fuc(n-1);//调用fuc方法自身
    }

    public static void main(String[] args) {
        System.out.println(fuc(3));
    }
    public static int add(int x,int y){
        return x+y;
    }
    public static double add(double x,double y){
        return x+y;
    }
    public static double add(double x,double y,double z){
        return x+y;
    }

    public static void main2(String[] args) {
        int ret= add(1,2);
        System.out.println(ret);
       double ret1 = add(1.2,1.3);
        double ret2= add(1.2,1.3);
        System.out.println(ret1);
    }
    public static int gesSum(int n){
        return (n*(n+1))/2;
    }

    public static void main1(String[] args) {
        int ret =gesSum(5)*10;
        System.out.println(ret);
    }
}
